﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace sinhvien
{
    class Program
    {
        static void Main(string[] args)
        {
            sinhvien sv = new sinhvien();

            ConsoleKeyInfo k;
            
    	
            //--- Xay dung menu ----- 

            Console.WriteLine("Quan ly sinh vien");
            Console.WriteLine();
            Console.WriteLine("An   1:Nhap danh sach sinh vien ");
            Console.WriteLine("An   2:Tim ");
            Console.WriteLine("An   3:Luu ");
            Console.WriteLine("An   4:Hien thi thong tin");
            Console.WriteLine("An ESC:Thoat ");
           	Console.WriteLine();
            do 
            { 
                Console.WriteLine();
               	Console.Write("Nhan phim: ");
                k = Console.ReadKey();

                if (k.Key == ConsoleKey.D1)
                {	
                   //Nhap
                   sv.nhap();
                   sv.hienthi();
                }
                else if (k.Key == ConsoleKey.D2)
                {
                  //Tim
                }
                else if (k.Key == ConsoleKey.D3)
                {
                  //Luu
                }
                 else if (k.Key == ConsoleKey.D4)
                {
                  //Hien thi
                }
                else if (k.Key == ConsoleKey.Escape)
           		{ //thoat
                Console.Clear();
                Console.WriteLine("GOODBYE!!!");
                
            	}
                else
                {	 Console.WriteLine();
                	 Console.WriteLine("Nhap khong dung ki tu, xin nhap lai");
                   
                }
            }while(k.Key != ConsoleKey.Escape);
             Console.ReadKey();
               
            }
     
    }
    
     class sinhvien
    {
        //du lieu
        private string hoten;
        private string msv;
        private string ma_lop;
        //hanh vi
        //ham tao
        public sinhvien()
        {
            hoten= "";
            msv = "" ;
            ma_lop="";
        }
        //ham tao nap chong
        public sinhvien(string ten, string masv, string malop)
        {
            hoten = ten;
            msv = masv;
            ma_lop = malop;
        }
        //ham cap nhat du lieu
        //doi voi moi du lieu can co 1 ham cap nhat.
        public void set_hoten(string ht)
        {
            hoten = ht;
        }
        public void set_msv(string masv)
        {	
        	msv = masv;
        
        }
        public void set_ma_lop(string mlop)
        {	
        	ma_lop = mlop;
        
        }
        
        //... xay dung cac ham con lai
        //
        //ham lay du lieu
        public string get_msv()
        {
            return msv;
        }
        
        public string get_hoten()
        {
        	return hoten;
        }
        public string get_ma_lop()
        {
        	return ma_lop;
        }
       
        //.... xay dung cac ham con lai
        //
        //hanh vi
        public void nhap()        
        {
            Console.WriteLine("Nhap ho ten:");
            hoten = Console.ReadLine();
            Console.WriteLine("Nhap msv: ");
            msv = Console.ReadLine();
            Console.WriteLine("Nhap ma_lop: ");
            ma_lop = Console.ReadLine();
        }
        public void hienthi()
        { 
            Console.WriteLine();
        }
    }
  
}



          